package com.example.myrequestbody.model;

import com.example.myrequestbody.validator.AddGroup;

import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 学生
 *
 * @author dlp
 * @date 2024/08/27
 */
@Data
public class Student implements Serializable {
    private static final long serialVersionUID = 1L;


    /**
     * 身份证件
     */
    private Long id;

    /**
     * 学生姓名
     */
    @NotNull(message = "学生姓名不能为空！",groups = AddGroup.class)
    private String studentName;

    /**
     * 类名
     */
    private String className;

    /**
     * 等级
     */
    private String grade;

    /**
     * 年龄
     */
    private Integer age;

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", studentName='" + studentName + '\'' +
                ", className='" + className + '\'' +
                ", grade='" + grade + '\'' +
                ", age=" + age +
                '}';
    }
}
